﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ModelQuality.Metrics.Engine;

namespace ModelQuality.Metrics.Rules
{
    interface IValidationRule<T>
    {
        /// <summary>
        /// Returns true if rule must be applied on the object
        /// </summary>
        /// <param name="objectToValidate"></param>
        /// <returns></returns>
        bool Matches(T objectToValidate);
        
        /// <summary>
        /// Validates the object and returns a result
        /// </summary>
        /// <param name="objectToValidate"></param>
        /// <returns></returns>
        ValidationResult Validate(T objectToValidate);
    }
}
